﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using MxWeiXinPF.Common;
using MxWeiXinPF.Templates;

namespace MxWeiXinPF.Web.shop
{
    public partial class search : ShopBasePage
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            if (base.errInitTemplates != "")
            {
                base.Response.Write(base.errInitTemplates);
            }
            else
            {
                base.templateFileName = new MxWeiXinPF.BLL.wx_module_templates().GetTemplatesFileNameByWid("shop", base.wid);
                if ((base.templateFileName == null) || (base.templateFileName.Trim() == ""))
                {
                    base.errInitTemplates = "不存在该帐号或者该帐号尚未设置模版！";
                    base.Response.Write(base.errInitTemplates);
                    base.Response.End();
                }
                else
                {
                    MxWeiXinPF.BLL.wx_dt_user_BaseData data = new MxWeiXinPF.BLL.wx_dt_user_BaseData();
                    base.serverPath = MyCommFun.GetRootPath() + "/shop/templates/" + base.templateFileName + "/search.html";
                    //new ShopTemplateMgr("/shop/templates/" + base.templateFileName, base.serverPath, base.wid) { tType = TemplateType.ProductList, openid = MyCommFun.RequestOpenid(), keyword = MyCommFun.QueryString("keyword"), shopid = MyCommFun.RequestInt("shopid") }.OutPutHtml(base.wid);
                    new ShopTemplateMgr("/shop/templates/" + base.templateFileName, base.serverPath, base.wid, base.shopid) { tType = TemplateType.ProductList, openid = MyCommFun.RequestOpenid(), keyword = MyCommFun.QueryString("keyword"), shopid = MyCommFun.RequestInt("shopid") }.OutPutHtml(base.wid);
                }
            }
        }
    }
}